import {
  ErrorRequestHandler,
  Request,
  Response,
  NextFunction,
  response,
} from "express";
import { err as aaa } from "./infoerr";

const errhandle: ErrorRequestHandler = (err, req, res, next) => {
  const status = err.status || 500;
  const msg = err.message || "服务端错误";
  res.status(status);
  aaa(res, msg);
};
export default errhandle;
